<template>
  <div class="loading_cover_container"
  v-show="show">
    <div class="loading_container">
      <div class="loading_wrapper">
        <img src="../../assets/loading.gif"/>
        <div>{{this.option.title}}</div>
        <button @click="close">确定</button>
      </div>
    </div>
  </div>
</template>

<script>

export default {
  data(){
    return{
      show:false,
      title:"正在加载...",
      option:{
        title:"11111",
        content:"",
        confirm:()=>{this.close()}
      }
    }
  },
  methods:{
    close(){
      this.show = false;
      this.option.confirm();
    }
  }
}
</script>

<style scoped>
.loading_cover_container
{
  width: 100vw;
  height: 100vh;
  position: fixed;
  left:0px;
  top:0px;
  background-color: rgba(0, 0, 0, 0.4);
}

.loading_container
{
  width: 100%;
  height: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.loading_wrapper
{
  width: 200px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.loading_wrapper img
{
  width: 90px;
}

.loading_wrapper div
{
  margin-top: 10px;
  width: 100%;
  font-size: 20px;
  font-weight: 700;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

</style>